export function debounce(fn,delay){
    let time = null
    return function(){
        if (time) clearTimeout(time)
        time = setTimeout(fn,delay)
    }
} 